/**
 * Copyright (c) 2009 blurredVision
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
 * associated documentation files (the "Software"), to deal in the Software without restriction, 
 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or 
 * substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 
 * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 
 * OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#ifndef __GUI_IGUIRENDERER_H__
#define __GUI_IGUIRENDERER_H__

#pragma once

#include "geom/Vector.h"

namespace gui {

/**
 * \ingroup CoreEngine
 *
 * \date 05-02-2007
 *
 * \author juckel
 *
 * \todo Insert comments.
 *
 */
class GUI_EXPORT IGUIRenderer
{
public:
	virtual void clear() = 0;
	/// Draw a non filled rectangle on screen
	virtual void drawRect(int x, int y, int width, int height, const math::Vector4 &color) = 0;
	virtual void drawRoundRect(int x, int y, int width, int height, const math::Vector4 &color) = 0;

	/// Draw a filled rectangle on screen
	virtual void drawFilledRect(int x, int y, int width, int height, const math::Vector4 &color) = 0;
	
	/// Draw a textured rectangle on screen. A subset of a texture can be specified
	virtual void drawTexturedRect(int x, int y, int width, int height, int texX, int texY) = 0;

	/// Draw a circle line with the center at position x, y
	virtual void drawCircle(int x, int y, float radius, int segments, const math::Vector4 &color) = 0;

	/// Draw a filled circle with the center at position x, y
	virtual void drawFilledCircle(int x, int y, float radius, int segments, const math::Vector4 &color) = 0;

	/// Enable rendering state for the GUI
	virtual void enableGUIState() = 0;

	/// Disable the GUIs rendering state
	virtual void disableGUIState() = 0;

	virtual math::Vector2i getScreenSize() = 0;

	virtual ~IGUIRenderer() {};
protected:
	IGUIRenderer() {};
};

GUI_EXPORT
IGUIRenderer* getGUIRenderer();

} // namespace

#endif
